﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Shop/MasterPageSH.master" AutoEventWireup="true" CodeFile="Categories.aspx.cs" Inherits="Admin_Categories" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <table style="width:100%;">
                <tr>
                    <td class="style1" colspan="2" 
                        style="border-bottom-style: outset; border-bottom-width: 1px; height: 48px;">
                        <asp:Label ID="lblTitle2" runat="server" Font-Size="16pt" ForeColor="#0099FF" 
                            Text="Add Categories"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="style2" style="width: 132px">
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style2" style="width: 132px">
                        <asp:Label ID="lblCategoriesID" runat="server" Text="CategoriesID:"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="txtCategoriesID" runat="server" Enabled="False" Width="236px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="style2" style="width: 132px; height: 28px;">
                        <asp:Label ID="lblCatalog" runat="server" Text="Catalog:"></asp:Label>
                    </td>
                    <td style="height: 28px">
                        <asp:DropDownList ID="ddlCatalog" runat="server" Height="22px" Width="236px">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td class="style2" style="width: 132px">
                        <asp:Label ID="lblCategoriesName" runat="server" Text="CategoriesName"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="txtCategoriesName1" runat="server" 
                            Width="236px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="style2" style="width: 132px">
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style2" style="width: 132px">
                        <asp:Label ID="lblError" runat="server" ForeColor="#FF3300" Text="Label" 
                            Visible="False"></asp:Label>
                    </td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style2" style="width: 132px">
                        &nbsp;</td>
                    <td>
                        <asp:Button ID="btnSummit" runat="server" BorderStyle="Inset" BorderWidth="1px" 
                            onclick="btnSummit_Click" Text="Summit" />
                    </td>
                </tr>
            </table>
            <br />
            <table style="width: 100%; height: 242px;">
                <tr>
                    <td style="height: 46px; border-bottom-style: outset; border-bottom-width: 1px;">
                        <asp:Label ID="lblProduct" runat="server" Font-Bold="True" Font-Size="12pt" 
                            ForeColor="#99CCFF" Text="Categories List"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="lblSearch0" runat="server" Text="Search Product name:"></asp:Label>
                        <asp:TextBox ID="txtCategoriesName" runat="server" Height="21px" 
                            style="margin-left: 31px" Width="265px"></asp:TextBox>
                        <asp:Button ID="btnSearch0" runat="server" BorderStyle="Inset" 
                            BorderWidth="1px" onclick="btnSearch0_Click" style="margin-left: 98px" 
                            Text="Search" />
                    </td>
                </tr>
                <tr>
                    <td style="height: 24px">
                        <asp:Label ID="lblError1" runat="server" ForeColor="Red" Text="Label" 
                            Visible="False"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td style="height: 15px">
                        <asp:GridView ID="grvData" runat="server" AllowPaging="True" 
                            AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="CategoriesID" 
                            onrowcancelingedit="grvDataCancel" 
                            onrowdeleting="grvDataDelete" onrowediting="grvDataEdit" 
                            onrowupdating="grvDataUpload" Width="99%" 
                            onpageindexchanging="grvData_PageIndexChanging">
                            <Columns>
                                <asp:TemplateField HeaderText="CategoriesID">
                                    <ItemTemplate>
                                        <asp:Label ID="lblCategoriesID" runat="server" 
                                            Text='<%# Eval("CategoriesID") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="CatalogID">
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="ddlCatalog" runat="server" DataSourceID="LinqDataSource1" 
                                            DataTextField="CatalogName" DataValueField="CatalogID" Height="20px" 
                                            Width="137px">
                                        </asp:DropDownList>
                                        <asp:LinqDataSource ID="LinqDataSource1" runat="server" 
                                            ContextTypeName="DataClassesDataContext" EntityTypeName="" 
                                            Select="new (CatalogName, CatalogID)" TableName="tblCatalogs">
                                        </asp:LinqDataSource>
                                    </EditItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblCatalogID" runat="server" 
                                            Text='<%# Catalog(Eval("CatalogID")) %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="CategoriesName">
                                    <ItemTemplate>
                                        <asp:Label ID="lblCategoriesName" runat="server" 
                                            Text='<%# Eval("CategoriesName") %>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
                            </Columns>
                            <HeaderStyle CssClass="header" />
                        </asp:GridView>
                    </td>
                </tr>
                <tr>
                    <td style="height: 12px">
                        &nbsp;</td>
                </tr>
                <tr>
                    <td style="height: 12px">
                        &nbsp;</td>
                </tr>
            </table>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>

